{"ast":null,"code":"import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport TransitionGroup from './TransitionGroup';\n/**\n * The `<ReplaceTransition>` component is a specialized `Transition` component\n * that animates between two children.\n *\n * ```jsx\n * <ReplaceTransition in>\n *   <Fade><div>I appear first</div></Fade>\n *   <Fade><div>I replace the above</div></Fade>\n * </ReplaceTransition>\n * ```\n */\n\nvar ReplaceTransition = /*#__PURE__*/function (_React$Component) {\n  _inheritsLoose(ReplaceTransition, _React$Component);\n  function ReplaceTransition() {\n    var _this;\n    for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n      _args[_key] = arguments[_key];\n    }\n    _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n    _this.handleEnter = function () {\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n      return _this.handleLifecycle('onEnter', 0, args);\n    };\n    _this.handleEntering = function () {\n      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n        args[_key3] = arguments[_key3];\n      }\n      return _this.handleLifecycle('onEntering', 0, args);\n    };\n    _this.handleEntered = function () {\n      for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n        args[_key4] = arguments[_key4];\n      }\n      return _this.handleLifecycle('onEntered', 0, args);\n    };\n    _this.handleExit = function () {\n      for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n        args[_key5] = arguments[_key5];\n      }\n      return _this.handleLifecycle('onExit', 1, args);\n    };\n    _this.handleExiting = function () {\n      for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n        args[_key6] = arguments[_key6];\n      }\n      return _this.handleLifecycle('onExiting', 1, args);\n    };\n    _this.handleExited = function () {\n      for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n        args[_key7] = arguments[_key7];\n      }\n      return _this.handleLifecycle('onExited', 1, args);\n    };\n    return _this;\n  }\n  var _proto = ReplaceTransition.prototype;\n  _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) {\n    var _child$props;\n    var children = this.props.children;\n    var child = React.Children.toArray(children)[idx];\n    if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs);\n    if (this.props[handler]) {\n      var maybeNode = child.props.nodeRef ? undefined : ReactDOM.findDOMNode(this);\n      this.props[handler](maybeNode);\n    }\n  };\n  _proto.render = function render() {\n    var _this$props = this.props,\n      children = _this$props.children,\n      inProp = _this$props.in,\n      props = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\"]);\n    var _React$Children$toArr = React.Children.toArray(children),\n      first = _React$Children$toArr[0],\n      second = _React$Children$toArr[1];\n    delete props.onEnter;\n    delete props.onEntering;\n    delete props.onEntered;\n    delete props.onExit;\n    delete props.onExiting;\n    delete props.onExited;\n    return /*#__PURE__*/React.createElement(TransitionGroup, props, inProp ? React.cloneElement(first, {\n      key: 'first',\n      onEnter: this.handleEnter,\n      onEntering: this.handleEntering,\n      onEntered: this.handleEntered\n    }) : React.cloneElement(second, {\n      key: 'second',\n      onEnter: this.handleExit,\n      onEntering: this.handleExiting,\n      onEntered: this.handleExited\n    }));\n  };\n  return ReplaceTransition;\n}(React.Component);\nReplaceTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n  in: PropTypes.bool.isRequired,\n  children: function children(props, propName) {\n    if (React.Children.count(props[propName]) !== 2) return new Error(\"\\\"\" + propName + \"\\\" must be exactly two transition components.\");\n    return null;\n  }\n} : {};\nexport default ReplaceTransition;","map":{"version":3,"names":["_objectWithoutPropertiesLoose","_inheritsLoose","PropTypes","React","ReactDOM","TransitionGroup","ReplaceTransition","_React$Component","_this","_len","arguments","length","_args","Array","_key","call","apply","concat","handleEnter","_len2","args","_key2","handleLifecycle","handleEntering","_len3","_key3","handleEntered","_len4","_key4","handleExit","_len5","_key5","handleExiting","_len6","_key6","handleExited","_len7","_key7","_proto","prototype","handler","idx","originalArgs","_child$props","children","props","child","Children","toArray","maybeNode","nodeRef","undefined","findDOMNode","render","_this$props","inProp","in","_React$Children$toArr","first","second","onEnter","onEntering","onEntered","onExit","onExiting","onExited","createElement","cloneElement","key","Component","propTypes","process","env","NODE_ENV","bool","isRequired","propName","count","Error"],"sources":["/Users/iliyagladkov/to-do-react/node_modules/react-transition-group/esm/ReplaceTransition.js"],"sourcesContent":["import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport TransitionGroup from './TransitionGroup';\n/**\n * The `<ReplaceTransition>` component is a specialized `Transition` component\n * that animates between two children.\n *\n * ```jsx\n * <ReplaceTransition in>\n *   <Fade><div>I appear first</div></Fade>\n *   <Fade><div>I replace the above</div></Fade>\n * </ReplaceTransition>\n * ```\n */\n\nvar ReplaceTransition = /*#__PURE__*/function (_React$Component) {\n  _inheritsLoose(ReplaceTransition, _React$Component);\n\n  function ReplaceTransition() {\n    var _this;\n\n    for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n      _args[_key] = arguments[_key];\n    }\n\n    _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n\n    _this.handleEnter = function () {\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      return _this.handleLifecycle('onEnter', 0, args);\n    };\n\n    _this.handleEntering = function () {\n      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n        args[_key3] = arguments[_key3];\n      }\n\n      return _this.handleLifecycle('onEntering', 0, args);\n    };\n\n    _this.handleEntered = function () {\n      for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n        args[_key4] = arguments[_key4];\n      }\n\n      return _this.handleLifecycle('onEntered', 0, args);\n    };\n\n    _this.handleExit = function () {\n      for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n        args[_key5] = arguments[_key5];\n      }\n\n      return _this.handleLifecycle('onExit', 1, args);\n    };\n\n    _this.handleExiting = function () {\n      for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n        args[_key6] = arguments[_key6];\n      }\n\n      return _this.handleLifecycle('onExiting', 1, args);\n    };\n\n    _this.handleExited = function () {\n      for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n        args[_key7] = arguments[_key7];\n      }\n\n      return _this.handleLifecycle('onExited', 1, args);\n    };\n\n    return _this;\n  }\n\n  var _proto = ReplaceTransition.prototype;\n\n  _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) {\n    var _child$props;\n\n    var children = this.props.children;\n    var child = React.Children.toArray(children)[idx];\n    if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs);\n\n    if (this.props[handler]) {\n      var maybeNode = child.props.nodeRef ? undefined : ReactDOM.findDOMNode(this);\n      this.props[handler](maybeNode);\n    }\n  };\n\n  _proto.render = function render() {\n    var _this$props = this.props,\n        children = _this$props.children,\n        inProp = _this$props.in,\n        props = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\"]);\n\n    var _React$Children$toArr = React.Children.toArray(children),\n        first = _React$Children$toArr[0],\n        second = _React$Children$toArr[1];\n\n    delete props.onEnter;\n    delete props.onEntering;\n    delete props.onEntered;\n    delete props.onExit;\n    delete props.onExiting;\n    delete props.onExited;\n    return /*#__PURE__*/React.createElement(TransitionGroup, props, inProp ? React.cloneElement(first, {\n      key: 'first',\n      onEnter: this.handleEnter,\n      onEntering: this.handleEntering,\n      onEntered: this.handleEntered\n    }) : React.cloneElement(second, {\n      key: 'second',\n      onEnter: this.handleExit,\n      onEntering: this.handleExiting,\n      onEntered: this.handleExited\n    }));\n  };\n\n  return ReplaceTransition;\n}(React.Component);\n\nReplaceTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n  in: PropTypes.bool.isRequired,\n  children: function children(props, propName) {\n    if (React.Children.count(props[propName]) !== 2) return new Error(\"\\\"\" + propName + \"\\\" must be exactly two transition components.\");\n    return null;\n  }\n} : {};\nexport default ReplaceTransition;"],"mappings":"AAAA,OAAOA,6BAA6B,MAAM,yDAAyD;AACnG,OAAOC,cAAc,MAAM,0CAA0C;AACrE,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,MAAM,WAAW;AAChC,OAAOC,eAAe,MAAM,mBAAmB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAIC,iBAAiB,GAAG,aAAa,UAAUC,gBAAgB,EAAE;EAC/DN,cAAc,CAACK,iBAAiB,EAAEC,gBAAgB,CAAC;EAEnD,SAASD,iBAAiB,GAAG;IAC3B,IAAIE,KAAK;IAET,KAAK,IAAIC,IAAI,GAAGC,SAAS,CAACC,MAAM,EAAEC,KAAK,GAAG,IAAIC,KAAK,CAACJ,IAAI,CAAC,EAAEK,IAAI,GAAG,CAAC,EAAEA,IAAI,GAAGL,IAAI,EAAEK,IAAI,EAAE,EAAE;MACxFF,KAAK,CAACE,IAAI,CAAC,GAAGJ,SAAS,CAACI,IAAI,CAAC;IAC/B;IAEAN,KAAK,GAAGD,gBAAgB,CAACQ,IAAI,CAACC,KAAK,CAACT,gBAAgB,EAAE,CAAC,IAAI,CAAC,CAACU,MAAM,CAACL,KAAK,CAAC,CAAC,IAAI,IAAI;IAEnFJ,KAAK,CAACU,WA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